﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ZapHelper
{
    [Serializable]
    public class ConnectionFailedException : Exception
    {
        public Uri Uri { get; protected set; }
        public ConnectionFailedException(Uri uri) { }
        public ConnectionFailedException(Uri uri, string message) : base(message) { this.Uri = uri; }
        public ConnectionFailedException(Uri uri, string message, Exception inner) : base(message, inner) { this.Uri = uri; }
        protected ConnectionFailedException(
          System.Runtime.Serialization.SerializationInfo info,
          System.Runtime.Serialization.StreamingContext context)
            : base(info, context) { }

        public override string Message
        {
            get
            {
                return base.Message + '\n' + Uri.ToString();
            }
        }
    }
}
